package libs.game;

/**
 *              This interface will be implemented by classes which represent game plans.
 * 
 * @author      Jan Papousek
 * @version     2009-03-12
 */
public interface GamePlan {

    /**
     *          It returns number of columns in game plan.
     *
     * @return  Number of columns.
     */
    int columns();

    /**
     *          It returns a field type with specific coordinates.
     *
     * @param   coordinates     A field coordinates.
     * @return  A field type.
     */
    char getField(Coordinates coordinates);

    /**
     *          It returns a game plan.
     * 
     * @return  Game plan.
     */
    public char[][] getPlan();

    /**
     *          It makes a movement.
     *
     * @param   movementType    The movement type.
     * @return  TRUE if the movement was successful, otherwise FALSE.
     * @throws  UnsupportedOperationException if the movement type is not supprted.
     */
    boolean move(int movementType);

    /**
     *          It returns number of moves.
     *
     * @return  Number of moves from start position.
     */
    int numberOfMoves();

    /**
     *          It returns number of rows of game plan.
     * 
     * @return  Number of rows.
     */
    int rows();
}
